<!DOCTYPE html>
<html>
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
{% if seo is defined %}
<title>{{seo.title}}_{{seo.subtitle}}</title>
{% endif %}
{% if seo is defined %}
{% if seo.keywords %}
<meta name="keywords" content="{{seo.keywords}}" /> 
{% endif %}
{% if seo.description %}
<meta name="description" content="{{seo.description}}" />
{% endif %}
{% endif %}
<meta name="author" content="Powered By IKPHP">
<meta property="qc:admins" content="1247273077613000636" />

<link rel="shortcut icon" href="{{ static_url('static/images/fav.ico') }}" type="image/x-icon">
<link rel="icon" href="{{ static_url('static/images/fav.gif') }}" type="image/gif" />
{{assets.outputCss('SITE_THEME_CSS')}}
<!--[if gte IE 7]><!-->
    <link href="{{ static_url('static/js/dialog/skins5/idialog.css') }}" rel="stylesheet" />
<!--<![endif]-->
<!--[if lt IE 7]>
    <link href="{{ static_url('static/js/dialog/skins5/idialog.css') }}" rel="stylesheet" />
<![endif]-->

<script>var siteUrl = '{{SITE_URL}}',show_login_url='{{url("home/user/ajaxlogin")}}',show_register_url='{{url("home/user/ajaxregister")}}',site_ck='{{visitor["site_ck"]}}';</script>
<script src="{{static_url('static/js/jquery.js')}}" type="text/javascript"></script>
<script src="{{static_url('static/js/common.js')}}" type="text/javascript"></script>
<script src="{{static_url('static/js/IK.js')}}" type="text/javascript" data-cfg-autoload="false"></script>
<script src="{{static_url('static/js/all.js')}}" type="text/javascript"></script>
<!--[if lt IE 9]>
<script src="{{static_url('static/js/html5.js')}}"></script>
<![endif]-->
<script src="{{static_url('static/js/dialog/jquery.artDialog.min5.js')}}" type="text/javascript"></script>
{{assets.outputJs('EXTENDS_JS')}}
</head>
<body>
<!-- header -->
<header>
{% if app_name == 'home' and visitor is empty and controll_name == 'index'%}
<div class="hd-wrap">
            <div class="hd" id="anony-nav">
                <div class="logo">
                    <h1><a href="{{SITE_URL}}" title="爱客开源">爱客开源</a></h1>
                </div>
                <div class="anony-srh">
                <form onsubmit="return searchForm(this);" method="post" action="{{url('home/search/index')}}">
                <span class="inp"><input type="text" autocomplete="off" placeholder="书籍、电影、音乐、小组、小站、成员" size="12" maxlength="60" class="key" name="q"></span>
                <span class="bn"><input type="submit" value="搜索"></span>
                </form>
                </div>
                
                <div class="top-nav-items">
                <ul>
                <li><a href="{{SITE_URL}}" class="lnk-home" target="_blank">爱客首页</a></li>
                <li><a href="{{url('group')}}" class="lnk-group" target="_blank">爱客小组</a></li>
                <li><a href="{{url('article')}}" class="lnk-article" target="_blank">爱客阅读</a></li>
                <li><a href="{{url('location')}}" class="lnk-location" target="_blank">爱客同城</a></li>
                <li><a href="{{url('site')}}" class="lnk-site" target="_blank">爱客小站</a></li>
                <li><a href="{{url('mall')}}" class="lnk-mall" target="_blank">爱客商城</a></li>
                </ul>
                </div>
            </div>
</div>
{% else %}
<div class="top_nav">
  <div class="top_bd">
    
    <div class="top_info">
        {% if visitor is empty%}
		<a href="{{url('home/user/login')}}">登录</a>
         | <a href="{{url('home/user/register')}}">注册</a>
         | <a href="{{url('home/oauth/index/qq')}}" target="_blank" style="margin-left:10px"><img  align="absmiddle" title="QQ登录" src="{{PUBLIC}}/images/connect_qq.png"> 登录</a>
          | <a href="{{url('home/oauth/index/sina')}}" target="_blank" style="margin-left:10px"><img  align="absmiddle" title="新浪微博" src="{{PUBLIC}}/images/connect_sina_weibo.png"> 登录</a>    
        {% else %}
        <a id="newmsg" href="{{url('home/message/ikmail/inbox')}}">新消息({{count_new_msg}})</a> | 
            {% if visitor['doname'] is empty %}
            <a href="{{url('space/'~visitor['userid'])}}">{{visitor['username']}}</a>
            {% else %}
            <a href="{{url('space/'~visitor['doname'])}}">{{visitor['username']}}</a>
            {% endif %}	
         | 
        <a href="{{url('home/user/setbase')}}">设置</a> | 
        <a href="{{url('home/user/logout')}}">退出</a>
        {% endif %}
    </div>

    <div class="top_items">
        <ul>
             {% for item in ik_top_nav %}
              <li><a href="{{item['url']}}" title="{{item['name']}}">{{item['name']}}</a></li>
             {% endfor %}
             <li><a href="{{url('home/help/download')}}" style="color:#fff">IKPHP源码下载</a></li>                                                      
        </ul>
    </div>
  	<div class="cl"></div>
    
  </div>
  
</div>
{% endif %}
</header>
{% if app_name == 'home' and visitor %}
<div id="header">
    
	<div class="site_nav">
        <div class="{{ik_app_logo['style']}}">
            <a href="{{ik_app_logo['url']}}">{{ik_app_logo['name']}}</a>
        </div>
		<div class="appnav">
			    <ul id="nav_bar">
                    {% for key, item in ik_app_nav%}
                    <li><a href="{{item['url']}}" class="a_{{key}}">{{item['name']}}</a></li>
                    {% endfor%}
			    </ul>
		   <form onsubmit="return searchForm(this);" method="post" action="{{url('home/search/index')}}">
                <input type="hidden" value="all" name="type">
                <div id="search_bar">
                    <div class="inp"><input type="text" placeholder="小组、话题、日志、成员、小站" value="" class="key" name="q"></div>
                    <div class="inp-btn"><input type="submit" class="search-button" value="搜索"></div>
                </div>
		    </form>
		</div>
        <div class="cl"></div>
	</div>
        
</div>
{% endif %}
<!-- //end header -->
{{ content() }}
<!--footer-->
{% if visitor is empty %}
<div id="g-popup-reg" class="popup-reg" style="display:none;"><div class="bd"><iframe src="about:blank" frameborder="0" scrolling="no"></iframe><a href="javascript:;" class="lnk-close">&times;</a></div></div>
{% endif %}
<footer>
<div id="footer">
	<div class="f_content">
        <span class="fl gray-link" id="icp">
            &copy; 2012－2015 IKPHP.COM, all rights reserved <span><a href="http://www.miibeian.gov.cn/" target="_blank">{{ik_setting.ik_site_icp}}</a></span>
           
        </span>
        
        <span class="fr">
            <a href="{{url('home/help/about')}}">关于爱客</a>
            · <a href="{{url('home/help/contact')}}">联系我们</a>
            · <a href="{{url('home/help/agreement')}}">用户条款</a>
            · <a href="{{url('home/help/privacy')}}">隐私申明</a>
        </span>
        <div class="cl"></div>
        <p>Powered by <a class="softname" href="{{constant('IKPHP_SITEURL')}}">{{constant('IKPHP_SITENAME')}}</a> {{constant('IKPHP_VERSION')}}  
        <font color="green">本网站由 <a href="http://docs.phalconphp.com/zh/latest/index.html" target="_blank">Phalcon框架</a> 强力驱动 版本 {{ version() }}</font> 
        </p>  

    </div>
    
</div>
</footer>
<!--// end footer-->
</body>
</html>
